<template>
  <el-dialog
    :before-close="handleClose"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :title="globalData.title"
    :visible.sync="isDialog.visible"
    top="7vh"
    width="1050px"
  >
    <div class="header-box"></div>

    <div class="flex-content">
      <el-table :data="info.refundItem" style="width: 100%">
        <el-table-column align="center" label="商品" prop="goods_name">
        </el-table-column>

        <el-table-column align="center" label="规格" prop="spec_name">
        </el-table-column>

        <el-table-column align="center" label="成交价" prop="final_price">
        </el-table-column>

        <el-table-column
          align="center"
          label="下单数量"
          prop="buyNum"
          width="200"
        >
        </el-table-column>

        <el-table-column
          align="center"
          label="付款金额"
          prop="payInfo"
          width="200"
        >
        </el-table-column>
      </el-table>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: "Info",
  props: {
    info: {
      type: Object,
    },
  },
  data() {
    return {
      // 统计
      dataList: [],
      // 数据
      globalData: {
        title: "",
      },
      // 弹窗
      isDialog: {
        visible: true,
      },
    };
  },
  created() {
    this.globalData.title = "退款清单" + "( " + this.info.order_sn + ")";
  },
  methods: {
    // 关闭
    handleClose() {
      this.$emit("close");
    },
  },
};
</script>

<style lang="scss" scoped>
::v-deep .el-dialog__body {
  padding: 0 20px 20px 20px;
}

.header-box {
  display: flex;

  > div {
    margin-right: 10px;
  }
}

.flex-content {
  margin-top: 10px;

  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;

    .title {
      font-size: 18px;
      font-weight: bold;
    }
  }
}
</style>
